package logger

var (
	DefaultLogger Logger
)

type Logger interface {
	Init(options ...Option) error

	Options() Options

	Fields(fields map[string]any) Logger

	Log(level Level, v ...any)

	Logf(level Level, format string, v ...any)

	String() string
}

func Init(options ...Option) error {
	return DefaultLogger.Init(options...)
}

func Fields(fields map[string]any) Logger {
	return DefaultLogger.Fields(fields)
}

func Log(level Level, v ...any) {
	DefaultLogger.Log(level, v...)
}

func Logf(level Level, format string, v ...any) {
	DefaultLogger.Logf(level, format, v...)
}

func String() string {
	return DefaultLogger.String()
}
